Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#5031: Fix accessibility logic for wagons #5053

Open
wants to merge 9 commits into
base: develop
Choose a base branch
from

Conversation

dhthwy
Copy link
Contributor

@dhthwy dhthwy commented Nov 29, 2024

Fixes #5031

The save for 5031 has down stairs blocking the wagon path. This PR attempts more robust wagon accessibility handling.

Other issues:

There is also an issue with the 'follow mouse' functionality where walkability is being correctly set for top ramps. This causes the UI to erroneously display an 'X' over the ramp tile, incorrectly indicating that the tile (or the z-level below) is inaccessible.

I am unsure about tests for this.

Me, from elsewhere:

"It looks like walkable is computed by df, right? The down ramp itself is not walkable. I suspect we'll have to special case ramps in Maps and have it tie its walkability group to an adjacent tiles group" AND ensure the tile below the ramp also matches the group of its adjacent tile.

Assumed invariant: adjacent tiles belong to the same walkability group.

@dhthwy
Copy link
Contributor Author

dhthwy commented Nov 29, 2024

Apparently I may have worked on a separate problem that I saw. After re-reading the issue, if dfhack claims wagon is accessible when it is not, then this doesn't fix that. Back to the start on this one -- though I still think these changes may be wanted and possibly necessary for the fix.

@dhthwy dhthwy marked this pull request as draft November 29, 2024 23:26
@dhthwy
Copy link
Contributor Author

dhthwy commented Nov 29, 2024

Marked as draft temporarily.

@dhthwy
Copy link
Contributor Author

dhthwy commented Nov 30, 2024

The first four commits deal with what I perceive to be an issue with how down ramps are handled. Without those commits, we get X's on the down ramps, but not on the up ramps. The lack of symmetry is odd. However, it probably doesn't belong in this PR - especially the change in Maps.

The down ramp appearance change in pathable will, iirc, visually make down ramps appear accessible for wagons. I believe the change in maps was to do the same for 'follow mouse' in gui/pathable.

I think I am done with this pending review and pending some tests on that adv mode save from the original complaint.

@dhthwy dhthwy marked this pull request as ready for review November 30, 2024 20:04
@dhthwy dhthwy changed the title #5031: Handle top ramps when pathfinding to depot #5031: Fix wagon accessibility Nov 30, 2024
@dhthwy dhthwy changed the title #5031: Fix wagon accessibility #5031: Fix accessibility logic for wagons Nov 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

gui/pathable says depot is wagon accessible but it is not
1 participant